#! /usr/bin/env bash

# 初始化Openh264

set -e

# 当前执行脚本所在的文件夹
SCRIPT_DIR=$(cd "$(dirname "$0")";
pwd)
SCRIPT_NAME=$(basename "$0")

OS=$1
TARGET=$2
CODE_REPO_PATH=$3
BUILD_PATH=$4

# github仓库可能下载很慢，可以用gitee代替
# REMOTE_REPO=https://github.com/cisco/openh264.git
REMOTE_REPO=https://gitee.com/lkdont/openh264.git
LOCAL_REPO=${CODE_REPO_PATH}/openh264
BUILD_DEST=${BUILD_PATH}/${OS}/repos/openh264-${TARGET}
REPO_VER=v2.1.1

sh ${SCRIPT_DIR}/init-repo.sh ${SCRIPT_NAME} ${OS} ${TARGET} ${REMOTE_REPO} ${LOCAL_REPO} ${BUILD_DEST} ${REPO_VER}